home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
7
/
autod101.zip
/
CRSADL.SLT
next >
Wrap
Text File
|
1991-07-09
|
4KB
|
142 lines
// AutoDownload Telix Script for CRS ver 1.01 d/ 09 JUL 91
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// This SALT Script file continuously redials CRS until a connection
// is established. It then opens the file "FILES.DL" (which should
// contain a list of files to be downloaded), logs into the IBM conference,
// and Batch Downloads the files listed using ZModem. After the download
// session (or if disconnected), the script automatically hangs up and
// exits Telix to DOS.
// modified from scripts by Matthew Silver and "JOHN DORF"
str user_name[] = "YOUR NAME"; // Replace with your name.
str listname[] = "FILES.DL"; // file name of list to download
str fname [14]; // filename to download
int infile; // dllist.get file handle
str number_list[] = "1 2"; // dialing dir entries to redial
main()
{
int stat;
int t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
t9,
t10,
t11;
int tmark;
int conf_flag = 0;
alarm(1);
redial(number_list,0,1); // redial numbers til connxn
infile = fopen(listname,"r"); // open download files list
if (infile == 0)
prints("Error opening FILES.DL!");
t1 = track("Language # to use", 0);
t2 = track(" graphics", 0);
t3 = track("first name?", 0);
t4 = track("Password",0);
t5 = track("(H)elp, More?", 0);
t6 = track("Scan Message Base", 0);
t7 = track("Main Board Command", 0);
t8 = track("Conference Command?",0);
t9 = track("Filename to Download",0);
t10 = track("Protocol Type for Transfer",0);
t11 = track("(G)oodbye after Batch,",0);
tmark = timer_start(1800);
while (1)
{
terminal();
stat = track_hit(0);
if (stat == t1) // "language # to use"
{
delay(1);
cputc('^M');
}
else if (stat == t2) //"graphics"
{
cputs("N Q");
cputc('^M');
}
else if (stat == t3) //"first name"
{
cputs(user_name);
cputc('^M');
}
else if (stat == t4) //"Password"
{
cputs(_entry_pass);
cputc('^M');
}
else if (stat == t5) //"(H)elp, More?"
{
cputs("n");
cputc('^M');
}
else if (stat == t6) //"Scan Message Base"
{
cputs("n");
cputc('^M');
}
else if (stat == t7) //"Main Board Command"
{
cputs("j 2");
cputc('^M');
}
else if (stat == t8) //"Conference Command?"
{
cputs("DB");
cputc('^M');
}
else if (stat == t9) //"filename to download"
{
if (!feof(infile)) // process this list
{
fgets(fname,14,infile);
cputs(fname); // enter the filename
cputs("^M");
}
else
{
fclose(infile);
}
}
else if (stat == t10) //"Protocol Type for Transfer"
{
cputs("Z");
cputc('^M');
}
else if (stat == t11) //"(G)oodbye after Batch,"
{
cputs("G");
cputc('^M');
timer_free(tmark);
track_free(0);
}
else if (not carrier (1))
{
hangup(0);
exittelix(0);
break;
}
}
if (time_up(1))
prints("Logon failed!");
timer_free(tmark);
track_free(0);
}